from ultralytics import YOLO
# if __name__ == '__main__':
#     model = YOLO(r'yolo11n-cls.pt')
#     result = model.train(data=r'C:\Users\15123\Desktop\YOLO\yolo11-cls\datasets\car_color', epochs=100, device=0, batch=4)
#     print(result)

# if __name__ == '__main__':
#     model = YOLO(r'C:\Users\15123\Desktop\YOLO\yolo11-cls\runs\classify\train2\weights\best.pt')
#     result = model.val(data=r'C:\Users\15123\Desktop\YOLO\yolo11-cls\datasets\car_color')
#     print(result)

if __name__ == '__main__':
    model = YOLO(r'C:\Users\15123\Desktop\YOLO\yolo11test\runs\detect\train2\weights\best.pt')
    result = model.predict(source=r'C:\Users\15123\Desktop\YOLO\yolo11test\datasets\helmet\images\train\0044.jpg', save=True, show=True)
    print(result)

# if __name__ == '__main__':
#     model = YOLO(r'C:\Users\15123\Desktop\YOLO\yolo11-cls\runs\classify\train2\weights\best.pt')
#     result = model.export(format='onnx')
#     print(result)

